import _ from "lodash";
import service from "@service";


export const getBaseRichSpeech = (obj = {}) => {
    const str = "####";
    const getText = (v) => {
        return v || str;
    }
    let baseList = [
        { insert: '客户于' },
        {
            insert: getText(obj.date),
            attributes: {
                bold: true
            }
        },
        { insert: '客户来电投诉其车辆：'},
        {
            insert: getText(obj.complainPlate),
            attributes: {
                bold: true
            }
        },
        { insert: '，'},
        {
            insert: getText(obj.vehicleColorName),
            attributes: {
                bold: true
            }
        },
        { insert: '，'},
        {
            insert: getText(obj.cardId),
            attributes: {
                bold: true
            }
        },
        { insert: '，'},
        {
            insert: `(${getText(obj.cardIdType)})`,
            attributes: {
                bold: true
            }
        },
        { insert: ', 通行清单显示'},
        {
            insert: `${getText(obj.enTime)}-${getText(obj.enTollStationName)}`,
            attributes: {
                bold: true
            }
        },
        { insert: ', '},
        {
            insert: `${getText(obj.exTime)}-${getText(obj.exTollStationName)}`,
            attributes: {
                bold: true
            }
        },
        { insert: ', 被收取'},
        {
            insert: getText(obj.fee),
            attributes: {
                bold: true
            }
        },
        { insert: '的通行费，省内收费'},
        {
            insert: getText(obj.thisPayFee),
            attributes: {
                bold: true
            }
        },
        { insert: '元, 省外收费'},
        {
            insert: getText(obj.outPayFee),
            attributes: {
                bold: true
            }
        },
        { insert: '元, 客户表示实际入口时间 '},
        {
            insert: `${getText(obj.actualExTime)}-${getText(obj.actualExTollStationName)}`,
            attributes: {
                bold: true
            }
        },
        { insert: ', '},
        {
            insert: `${getText(obj.actualEnTime)}-${getText(obj.actualEnTollStationName)}`,
            attributes: {
                bold: true
            }
        },
        { insert: ','},
    ]
    return baseList;        
}
